#include<stdio.h>
void zero(int arr[], int size)
{
	for (int i = 0; i <= size-1 ; i++)
	{
		arr[i] = 0;
	}
}

void print(int arr[], int size)
{
	for (int j = 0; j <= size - 1; j++)
	{
		printf("%d ", arr[j]);
	}
	printf("\n");
}

void reverse(int arr[], int size)
{
	int left = 0;
	int right = size - 1;
	while (left<=right)
	{
		int tem = 0;
		tem = arr[left];
		arr[left] = arr[right];
		arr[right] = tem;
		left++;
		right--;
	}
}
int main()
{
	int arr[10] = { 0,1,2,3,4,5,6,7,8,9 };
	int size = sizeof(arr) / sizeof(arr[0]);
	print(arr, size);//打印初始数组
	
	reverse(arr, size);//将数组元素逆置
	print(arr, size);//将数组元素逆置之后打印
	
	zero(arr, size);//将数组元素初始化为零
	print(arr, size);//将数组元素初始化后打印
	return 0;
}